<extend name="work/base"/>
<block name="content">
    <!-- content -->
    <div class="content">
        <div class="title">
            <h5>欢迎您的到来</h5>
            <h3>{:config('param.site_ad')}</h3>
            <h4>{:config('param.site_ad_en')}</h4>
        </div>
        <div class="layui-carousel imgbox" id="test1">
            <div carousel-item class="imgH">
                <volist name="slide" id="vo" key="k">
                    <div>
                        <a href="<eq name='vo.product_id' value='0'>{:url('home/news/info?id='.$vo.news_id)}<else/>{:url('home/product/info?id='.$vo.product_id)}</eq>"><img
                                class='slideimg' style="width: 100%;max-width: 100%;height: auto;"
                                src="{$vo.file_path}"></a></div>
                </volist>
            </div>
        </div>
        <div class="prod-show">
            <div class="layui-fluid">
                <div class="row layui-col-space12 layui-clear">
                    <volist name="product" id="vo" key="k">
                        <div class="layui-col-xs6 layui-col-sm6 layui-col-md3">
                            <a href="{:url('home/product/info?id='.$vo.id)}">
                                <div class="img-txt">
                                    <img style="width: 100%;" lay-src="{$vo.file_path}" alt="">
                                    <h3>{$vo.title}</h3>
                                </div>
                            </a>
                        </div>
                    </volist>

                </div>
            </div>
        </div>
        <div class="prod-descr">
            <div class="layui-fluid">
                <volist name="news" id="vo">
                    <div class="layui-row">
                        {$vo.info|raw}
                    </div>
                </volist>

            </div>
        </div>
        <div class="Partner">
            <div class="title">
                <h3>合作伙伴</h3>
                <h4>cooperative partner</h4>
            </div>
            <div class="cont-box">
                <div class="layui-fluid">
                    <div class="row layui-col-space20">
                        <div class="layui-col-xs6 layui-col-sm6 layui-col-md2">
                            <h2>LOGO</h2>
                        </div>
                        <div class="layui-col-xs6 layui-col-sm6 layui-col-md2">
                            <h2>LOGO</h2>
                        </div>
                        <div class="layui-col-xs6 layui-col-sm6 layui-col-md2">
                            <h2>LOGO</h2>
                        </div>
                        <div class="layui-col-xs6 layui-col-sm6 layui-col-md2">
                            <h2>LOGO</h2>
                        </div>
                        <div class="layui-col-xs6 layui-col-sm6 layui-col-md2">
                            <h2>LOGO</h2>
                        </div>
                        <div class="layui-col-xs6 layui-col-sm6 layui-col-md2">
                            <h2>LOGO</h2>
                        </div>
                        <div class="layui-col-xs6 layui-col-sm6 layui-col-md2">
                            <h2>LOGO</h2>
                        </div>
                        <div class="layui-col-xs6 layui-col-sm6 layui-col-md2">
                            <h2>LOGO</h2>
                        </div>
                        <div class="layui-col-xs6 layui-col-sm6 layui-col-md2">
                            <h2>LOGO</h2>
                        </div>
                        <div class="layui-col-xs6 layui-col-sm6 layui-col-md2">
                            <h2>LOGO</h2>
                        </div>
                        <div class="layui-col-xs6 layui-col-sm6 layui-col-md2">
                            <h2>LOGO</h2>
                        </div>
                        <div class="layui-col-xs6 layui-col-sm6 layui-col-md2">
                            <h2>LOGO</h2>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>

    <!-- end-content -->
</block>
<block name="script">
    <script>
        layui.use(['carousel', 'jquery', 'element', 'flow'], function () {
            var carousel = layui.carousel, $ = layui.$;
            //建造实例
            var flow = layui.flow;
            //当你执行这样一个方法时，即对页面中的全部带有lay-lay-src的img元素开启了懒加载（当然你也可以指定相关img）
            flow.lazyimg();
            carousel.render({
                elem: '#test1'
                , width: '100%' //设置容器宽度
                , arrow: 'always'
                , height: 'auto'
                //,anim: 'updown' //切换动画方式
            });
            $('.app-header-menuicon').on('click', function () {
                $('.header-down-nav').toggleClass('down-nav')
            })
            window.onload = function () {
                var imgH = $('.imgbox div.layui-this').outerHeight();
                $('.imgH').css('height', imgH + 'px')
            }
            window.onresize = function () {
                var imgH = $('.imgbox div.layui-this').outerHeight();
                $('.imgH').css('height', imgH + 'px')
                console.log(imgH);
            };
        });
    </script>
</block>